package com.juli.school.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.juli.school.dao.entity.Ver;
import com.juli.school.dao.mapper.VerMapper;
import com.juli.school.utils.core.model.CommonResp;

@Service
public class VerService {

	@Resource
	VerMapper verMapper;
	
	public CommonResp<Ver> getVer(Integer os) {
		CommonResp<Ver> commonResp = new CommonResp<Ver>();
		try {
			if (os != null) {
				throw new Exception("系统版本类别不可为空");
			}
			//查询最新的版本
			Ver ver = verMapper.getVerBytime(os);
			return commonResp;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}
